MenuOpenStateAdapter.onChange   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 3
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 3
dl 0
loc 3
ccs 1
cts 1
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
import {ObserverAdapter} from '@enbock/state-value-observer/ValueObserver';
2
3
export default class MenuOpenStateAdapter implements ObserverAdapter<boolean> {
4
  private currentState: boolean;
5
6
  constructor() {
7 2
    this.currentState = false;
8
  }
9
10
  onChange(newValue: boolean): void {
11 1
    this.currentState = newValue;
12
  }
13
}
14